<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */

/**
 * Short description for file
 *
 * PHP version 5.3.+
 *
 * @category   
 * @package    
 * @author     Marius Schmidt <marius.schmidt@gridground.de>
 * @copyright  2010-2012 Gridground UG (haftungsbeschränkt)
 * @license    http://www.gridground.de/license/brickscout.txt
 * @version    GIT: $Id$
 * @link       
 * @see        
 * @since      File available since 
 */

/**
 * Short description for class
 *
 * @category   
 * @package    
 * @author     Marius Schmidt <marius.schmidt@gridground.de>
 * @copyright  2010-2012 Gridground UG (haftungsbeschränkt)
 * @license    http://www.gridground.de/license/brickscout.txt
 * @version    Release: @package_version@
 * @link       
 * @see        
 * @since      Class available since Release 
 */
class ProductData extends Economic_ObjectAbstractImpl implements Economic_CreatableEntityData {

    public $Handle; // ProductHandle
    public $Number; // string
    public $ProductGroupHandle; // ProductGroupHandle
    public $Name; // string
    public $Description; // string
    public $BarCode; // string
    public $SalesPrice; // decimal
    public $CostPrice; // decimal
    public $RecommendedPrice; // decimal
    public $UnitHandle; // UnitHandle
    public $IsAccessible; // boolean
    public $Volume; // decimal
    public $DepartmentHandle; // DepartmentHandle
    public $DistributionKeyHandle; // DistributionKeyHandle
    public $InStock; // decimal
    public $OnOrder; // decimal
    public $Ordered; // decimal
    public $Available; // decimal

    public function create(array $attributes) {
        $data = new ProductData();
        $data->Number = $attributes['Number'];
        $data->ProductGroupHandle = $attributes['ProductGroupHandle'];
        $data->Name = $attributes['Name'];
        return $data;
    }

    public function getEconomicObjectClassName() {
        return 'ProductData';
    }

}
